package com.wy.crl;

import org.eclipse.core.runtime.IProgressMonitor;

import com.wy.base.AbstractWizard;
import com.wy.util.PluginUtils;

/**
 * Spring RestController Class向导页面逻辑类
 * 
 * @author 飞花梦影
 * @date 2021-07-19 16:22:58
 * @git {@link https://github.com/dreamFlyingFlower }
 */
public class RestCrlWizard extends AbstractWizard {

	/**
	 * Adding the page to the wizard.
	 */
	@Override
	public void addPages() {
		// page = new RestControllerPage(selection);
		// addPage(page);
		setPage(new RestCrlWizardPage(this.getSelection()));
		addPage(getPage());
	}

	/**
	 * This method is called when 'Finish' button is pressed in the wizard. We will
	 * create an operation and run it using wizard as execution context.
	 */
	@Override
	public boolean performFinish() {
		return super.performFinish("/templates/RestController.template");
	}

	@Override
	public void additionalFinish(String containerName, String packageName, String fileName, IProgressMonitor monitor,
			String templateUri) {
		PluginUtils.addPomSpringBootWeb(containerName);
	}
}